﻿using System.IO;
using System.Linq;
using System.Windows.Forms;
using RayDen.Library.Components.SystemComponents;
using RayDen.Optix.Engine.Components;

namespace OptixPlayground
{
    public class PlaygroundApp
    {
        public static void Main(params string[] args)
        {
            TracerFactory.Instance.PopulateDefault();

            string optixPath= @"C:\ProgramData\NVIDIA Corporation\OptiX SDK 3.7.0\";
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            string framePath = @"F:\Dev\Frames\RDF\scene_test_01.rdf";
            if (args.Any() && File.Exists(args[1]))
            {

                framePath = args[1];
            }

            using (var sample = new RenderWindow(framePath))
            {
                Application.Idle += sample.OnIdle;
                sample.Run();
            }
            
        }
    }
}
